The present invention generally relates to a method and apparatus for decompressing data in a client-server environment. More particularly, the present invention concerns software/firmware which reduces the memory resources required in decompressing data received on-the-fly from a network peripheral device and transmitting the same to a client web browser.
Scanning peripherals are becoming a larger segment of the peripheral industry. Users find such peripherals useful as a means of input for text, graphics and images. Many software applications now permit manipulation and use of such data. Some peripherals combine scanning with other functions. These multifunction peripherals are popular, in part, because of their ability to combine multiple useful functions into a single device. When connected to the network, the peripherals are operationally connected to the client devices via a dedicated peripheral server, which includes software and firmware for allowing the clients to interact with the peripherals using a web browser. Such software and firmware are disclosed in commonly assigned U.S. patent application Ser. No. 09/163,791 filed Sept. 30, 1998, now U.S. Pat. No. 6,289,371 by Kumpfet al., which application is incorporated by reference herein.
Generally, the invention disclosed in the Kumpf et al. application provides an interactive networked client-server scan method launched and actively managed through a web browser interface on a client. A server responds to a universal resource locator (URL) address identifying the server with a general purpose format software program that creates an interface in the client web browser and enables the client to interact with the server in initiating, altering and monitoring scan jobs and related data.
The present invention is directed toward improvements to the above-noted disclosure which enable a reduction in the amount of resources needed to decompress the data generated by the peripheral. Notably, peripheral devices such as, for example, a scanning device generate large amounts of data which is typically transmitted in a compressed format. However, a general purpose web browser like NETSCAPE NAVIGATORS(copyright) or MICROSOFT INTERNET EXPLORERS(copyright) typically expects to receive a predefined amount of decompressed data. Due to a variety of factors, it is difficult to predict the amount of data generated by a scan, even if the size of the image being scanned is known. Moreover, it is difficult to accurately predict the amount of decompressed data that will be yielded from decompressing a given amount of compressed data.
Accordingly, it is an object of the present invention to provide an improved method for decompressing data to be displayed on a software viewer in a client-server environment in which a scan server device relays communications over a network between at least one shared peripheral device which provides data in a compressed format and a web browser residing on a client device and expecting a predetermined amount (view-size) of decompressed data.
It is a further object of the present invention to provide such a method in software or firmware residing on either the scan server or the client device.
The present invention provides a method and apparatus for decompressing and communicating a predetermined amount of data in a client-server environment in which the server relays communications between a client web browser and at least one shared peripheral device. Compressed data from the peripheral device is decompressed on-the-fly, and is packaged and transmitted to the client web browser. Appropriate logic is provided to ensure that the web browser receives an expected amount of decompressed data regardless of the amount of compressed data provided by the peripheral device. Moreover, logic is provided to reduce the amount of resources required in decompressing the data.
According to one aspect of the invention, an inbound buffer storing compressed data is replenished each time the inbound buffer becomes depleted.
According to another aspect of the invention, an outbound buffer storing decompressed data is transmitted to the web browser when the amount of decompressed data contained in the outbound buffer (amt-stored) is at least a given predetermined value.
According to yet another aspect of the invention, the inbound buffer storing compressed data is replenished concurrently with data decompression, such that compressed data is being stored in said inbound buffer as compressed data is being decompressed and stored in the outbound buffer.
In a preferred embodiment of the invention, the data decompression logic is embodied software/firmware on the scan server. The scan server requests blocks of decompressed data from the shared peripheral device, and decompresses and transmits the decompressed data on-the-fly to the client web browser. The server tracks the amount of data transmitted, and if necessary initiates a padding/truncation operation to ensure that the client web browser receives the expected amount of data.